package com.company.project.dao;

import com.company.project.core.Mapper;
import com.company.project.model.Periodicals;
import com.company.project.model.PeriodicalsAssessModell;
import com.company.project.util.PageUtil;
import com.company.project.util.periodicalsWhere;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

@Repository
public interface PeriodicalsMapper extends Mapper<Periodicals> {
    /**
     * 根据期刊查询
     * @return
     */
    List<Map<Object,Object>> queryPM(@Param ("pageUtil") PageUtil pageUtil,@Param("cname") String cname);
    Integer queryCount(String cname);
    //根据多个条件查询期刊
    List<Periodicals> selectPeriodicalsByWhere(periodicalsWhere pw);

    //根据id查询期刊详情
    Periodicals selectPeriodicalsById(String id);

    //查询总条数
    Integer selectCounts(periodicalsWhere pw);

    //查询全部优秀期刊，分页
    List<Periodicals> selectPeriodicalsExcellence(@Param ("pageUtil") PageUtil pageUtil);

    //首页优秀期刊轮播图
    List<Periodicals> selectPeriodicalsExcellenceImg();

    //根究id查询期刊名称
    String SelectPeriodicalsName(Integer id);

    //后台查询期刊
    List<Periodicals> adminSelectPeriodicalsList(@Param("pageUtil") PageUtil pageUtil);

    //后台查单个期刊
    Periodicals adminSelectPeriodicals(Integer id);

    //后台查询总条数
    Integer adminSelectPeriodicalsCount();

    //后台删除期刊
    Integer adminDelectPeriodicals(Integer id);

    //期刊评估查询期刊
    List<Periodicals> selectPeriodicals(List<String> cname);

    //期刊修改状态
    int updateStatus(Periodicals periodicals);

    //期刊评估加载期刊
    List<PeriodicalsAssessModell> selectPeriodicalsAssess();
}
